package com.com.effectivejava.commonmethods.equals;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by pankaj on 7/11/14.
 */
public class ReflectiveProblem {

    public static void main(String[] args) {
        Employee3 e = new Employee3();
        List<Employee3> list = new ArrayList<>();

        list.add(e);
        list.add(e);

        System.out.println(" list.contains(e) = " + list.contains(new Employee3()));

    }


}

class Employee3{

    public Employee3() {
        super();
    }

    @Override
    public int hashCode() {
        System.out.println("Employee3.hashCode");
        return super.hashCode();
    }
}